<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('healthy/index')}">健康状况表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('healthy/index')}">
        学员：
        <input class="form-control" type="text" name="title" style="width: 200px;" value="{:input('request.title')}" placeholder="">
        状态：
        <select class="form-control" name="status">
            <option value="">---请选择---</option>
            <option value="-1" <if input('status') == '-1'>selected</if> >未通过</option>
            <option value="0" <if input('status') == 0 && input('status') != ''>selected</if> >待审核</option>
            <option value="1" <if input('status') == 1>selected</if> >已通过</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('healthy/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>学员</th>
                <th>健康状态</th>
                <th>自理能力</th>
                <th>体育锻炼</th>
                <th>饮食习惯</th>
                <th>吸烟情况</th>
                <th>饮酒情况</th>
                <th>状态</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}|{$vo.mobile}</td>
                    <td>{$vo.jkzk}</td>
                    <td>{$vo.zlnl}</td>
                    <td>
                        锻炼频率：{$vo.dlpl}<br>
                        每次锻炼时间：{$vo.dlsc}分钟<br>
                        坚持锻炼时间：{$vo.dlnl}年<br>
                        锻炼方式：{$vo.dlfs}<br>
                    </td>
                    <td>
                        {$vo.ysxg}
                    </td>
                    <td>
                        吸烟情况：{$vo.xyqk}<br>
                        日均吸烟量：{$vo.rxyl}支<br>
                        开始吸烟年龄：{$vo.ksxynl}岁<br>
                        戒烟年龄：{$vo.xynl}年<br>
                    </td>
                    <td>
                        饮酒频率：{$vo.yjpl}<br>
                        日均饮酒量：{$vo.ryjl}<br>
                        是否戒酒：{$vo.sfjj}<br>
                        戒酒年龄：{$vo.jjnl}年<br>
                        开始饮酒年龄：{$vo.ksjjnl}岁<br>
                        最近一年是否醉酒：{$vo.sfzj}<br>
                        饮酒种类：{$vo.yjzl}<br>
                    </td>
                    <td>
                        <if $vo.status == 0>待审批</if>
                        <if $vo.status == 1>已通过</if>
                        <if $vo.status == '-1'>已拒绝</if>
                    </td>
                    <td>
                        <if $vo.status == 0>
                            <a href="{:url('healthy/pass',array('id'=>$vo['id']))}" class="btn btn-xs btn-primary js-ajax-dialog-btn">通过</a>
                            <a href="{:url('healthy/refuse',array('id'=>$vo['id']))}" class="btn btn-xs btn-primary js-ajax-dialog-btn">拒绝</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>